Post

Replies

Boosts

Views

Activity

Reply to public core data not syncing with cloud kit
i also notice that canModifyManagedObjectsInStore returns NO for the public store, which apparently means that my public core data is not backed by CloudKit (how do i fix that?) or some other issue (can anyone suggest why that might be?). maybe this gets me closer, but it just changes the questions into different ones for which I still can't find an answer.
Apr ’23
Reply to CoreData: error: Mutating a managed object after it has been removed from it's context
your var definition recreates the managed object context each time it is called. try redefining it as follows to only create it the first time it is called: lazy var storeCoordinator: NSPersistentStoreCoordinator = { let coordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel) let url = self.documentDir.appendingPathComponent("Listen.sqlite") do { try coordinator.addPersistentStore(ofType: NSSQLiteStoreType, configurationName: nil, at: url, options: nil) } catch { print(error) } return coordinator }()
Jul ’22
Reply to lldb fails to launch process: "Not allowed to attach to process"
where do i add the get-task-allow and CODE_SIGN_INJECT_BASE_ENTITLEMENTS? I added them both to my plist, but with hardened runtime added, xcode won't attach, and with it not added, xcode will. so, if your answer is, yes, to your plist, then my question becomes: what else do i also need to do in addition to adding those two? Furthermore, adding CODE_SIGN... and removing hardened runtime cause Xcode to not be able to launch my app. removing both allows normal launch and debug to succed. Is this known? Can you explain?
Apr ’22
Reply to NSTextView inspector bar not showing paragraph style and some other tools
turns out one can remove existing constraints on each subview of the toolbar and replace them such that those that were hidden will appear in there proper positions. and yes, I know this is frowned upon, but desperation drives me. this is my Swift 4.0 version of such code. it uses a third-party framework called SnapKit, which is simpler for me for constructing constraints: var x = 7.0 for tool in subviews { let y = tool.isHidden ? -3.0 : -8.0 tool.removeConstraints(tool.constraints) tool.snp.makeConstraints { make in make.left.equalToSuperview().offset(x) make.bottom.equalToSuperview().offset(y) } x += tool.bounds.width + 3.0 tool.isHidden = false }
Feb ’22